package com.study.listener;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;


@Component
public class MyListener implements ApplicationListener<MyEvent>{

    public void onApplicationEvent(MyEvent event) {
        System.out.println("MyListener" + "监听到事件监听器执行。。。。。。" + event);
    }
}
@Component
 class MyListener1 implements ApplicationListener<ApplicationEvent>{

    public void onApplicationEvent(ApplicationEvent event) {
        System.out.println("MyListener1" + "监听到事件监听器执行。。。。。。" + event);
    }
}
